import axios from '@/network/request'
// 账户
export const userInfo = (pageSize,currentPage) => {
  return axios({
    method: 'get',
    url: `/test/userme/selectAll/${pageSize}/${currentPage}`,
  })
}
// 账户详情
export const usermenu=(id)=>{
  return axios({
    method:'get',
    url:`/test/userme/selectUsermessage/${id}`
  })
}
// 搜索账户
let seachuser='/test/userme/selectByCode'
export const seachUser=(code)=>{
  return axios({
    method:'get',
    url:seachuser,
    params:{code}
  })

}
// 修改账户信息
let userModify='/test/userme/updateUsermessage'
export const userModifyInfo=(data)=>{
  return axios({
    method:'put',
    url:userModify,
    data:data
  })
}
// 修改密码
let psd='/test/userme/updateUsermessagePwd'
export const modifyPsd=(data)=>{
  return axios({
    method:'put',
    url:psd,
    data:data
  })
}
// 修改用户状态
// let userstate = '/test/userme/updateStatus'
export const userState = (usermessageId,usermessageStatus) => {
  return axios({
    method: 'put',
    url: `/test/userme/updateStatus/${usermessageId}/${usermessageStatus}`,
  })
}
// 删除用户
export const removeUser = (id) => {
  return axios({
    method: 'put',
    url: `/test/userme/deleteUsermessage/${id}`
  })
}
// 新增用户
let addUserInfo='/test/userme/insertUsermessage'
export const addUser=(data)=>{
  return axios({
    method:'post',
    url:addUserInfo,
    data:data
  })
}